#include "FileValues.hpp"

void FileValues::clear() {
	for (size_t i = 0; i != vars.size(); i++)
		delete vars[i];
	vars.clear();
}

void FileValues::loadParamVars(std::istream& input) {
	for (size_t i = 0; i != vars.size(); i++)
		vars[i]->readParam(input);
}

void FileValues::writeParamVars(std::ostream& output, bool printTime) {
	if (printTime) {
		time_t t = time(NULL);
		output << comStr << "Time " << ctime(&t);
	}
	for (size_t i = 0; i != vars.size(); i++)
		vars[i]->writeParam(output);
	output << std::flush;
}


